import axios from 'axios';

const BASE_URL = 'http://your-api-server.com';

export const fetchCourses = async (type) => {
    try {
        const response = await axios.get(`${BASE_URL}/courses?type=${type}`);
        return response.data;
    } catch (error) {
        console.error('Error fetching courses:', error);
        return [];
    }
};
